using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NTTHAO.Web.BL.CommonPage;
using NTTHAO.CommonWeb;

public partial class Sites_Vigor_Webparts_Common_RightNews : NTTHAO.CommonWeb.CommonUserControl
{
    public static readonly int PAGE_SIZE = 5;
    public CommonPageGroup _Group = null;
    public CommonMenu _Menu = null;
    public DataTable _List = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            _Group = this.GetCurrentPageGroup();
            _Menu = CommonMenu.GetCommonMenu(9);

            long _TotalItem = 0;
            DataSet ds = CommonPageContent.GetPageByMenuID(_Menu.ID, 1, true, 0, ContentSortTypes.DefaultThenInsertTimeDecrease, 1, PAGE_SIZE, ref _TotalItem);
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                _List = ds.Tables[0];
            }
        }
        catch { }
    }

    public string GetURL(string menuPath, int contentID, string contentURLText)
    {
        return "/" + _Group.URLName + "/" + CommonMenu.GetUrlPath(menuPath) + "/" + contentURLText + "_" + contentID.ToString() + ".html";
    }
}
